

namespace Study210 {


  interface IPerson {
    zhongzu: string
  }

  // 岗位
  interface IZhiwei {
    // 岗位需求
    xuqiu: string
  }


  // 接口声明类型
  interface IStudent extends IPerson, IZhiwei {
    name: string
    readonly sex: string  // readonly只会作用到类型应用场景
    love: () => void
    fly(juli: number): void
  }

  class Student implements IStudent {

    constructor(
      public name: string,
      public sex: string,
      public zhongzu: string,
      public xuqiu: string
    ) { }

    love() {

    }

    fly(juli: number): void {

    }

  }




  // 运行时接口
  interface Flyable {

    // 不做具体实现，只定义函数框架
    fly(juli: number): void

  }

  class Fly implements Flyable {

    fly(juli: number): void {
      console.log(`飞行了${juli}米`);
    }
  }


  class StudentFly implements Flyable, IStudent {


    constructor(
      public name: string,
      public sex: string,
      public zhongzu: string,
      public xuqiu: string
    ) { }

    love() {

    }

    fly(juli: number): void {

    }


  }

}

export {}